package com.kaisu.blog.application.user.util;

import com.kaisu.blog.domain.user.User;
import org.springframework.security.core.context.SecurityContextHolder;

/**
 * @author kaisu
 */
public class UserUtil {
    public static User currentUser() {
        return (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
    }
}
